# producer_main.py
from sources.generators import KafkaDataProducer
import config

if __name__ == "__main__":
    producer = KafkaDataProducer(
        config.KAFKA_CONFIG['bootstrap_servers'],
        config.KAFKA_CONFIG['topic']
    )
    producer.run(interval=0.5)  # 每0.5秒生成一条数据